package gq.example.service.impl;

import gq.example.entity.UsersAndRole;
import gq.example.mapper.UsersAndRoleMapper;
import gq.example.service.IUsersAndRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserAndRoleServiceImpl implements IUsersAndRoleService {

    @Autowired
    private UsersAndRoleMapper usersAndRoleMapper;

    @Override
    public int addRole(UsersAndRole role) {
        return usersAndRoleMapper.addRole(role);
    }

    @Override
    public int updateRolesById(List<UsersAndRole> roles) {
        return usersAndRoleMapper.updateRolesById(roles);
    }

    @Override
    public int deleteRoleById(int id) {
        return usersAndRoleMapper.deleteRoleById(id);
    }
}
